<include file="__PUBLIC__/header"/>
<div class="page-container">
    <!--菜单-->
    <div class="cl pd-5 bg-1 bk-gray mt-10 mb-10">
        <span class="l">
            <a href="javascript:;" onclick="qz_layer_open('新增配置项','{|U:'add'}')" class="btn btn-primary radius"><i class="Hui-iconfont">&#xe600;</i> 新增</a>
            <a href="javascript:;" onclick="ajax_req('{|U:'updateCache'}')" class="btn btn-warning radius"><i class="iconfont icon-qingchuhuancun3"></i> 更新配置缓存</a>
        </span>
        <span class="r" style="line-height:1.6em;margin-top:3px"><strong>模板中调用配置项方法为<literal>{$qz.config.变量名}</literal></strong></span>
    </div>
    <!--列表-->
    <form class="form form-horizontal" id="form" method="post" action="{|U:'index'}">
        <div id="tab-system" class="HuiTab">
            <div class="tabBar cl">
                <list from="$data" name="$qz">
                    <span >{$qz.title}</span>
                </list>
            </div>
            <list from="$data" name="$qz">
            <div class="tabCon">
                <table class="table table-border table-bordered table-bg mt-20 table-sort" id="table">
                    <thead>
                    <tr class="text-c">
                        <th>排序</th>
                        <th>标题</th>
                        <th>配置</th>
                        <th>变量</th>
                        <th>描述</th>
                        <th>系统?</th>
                        <th>操作</th>
                    </tr>
                    </thead>
                    <list from="$qz._config" name="$q">
                        <tr class="text-c">
                            <td>
                                <input type="text" class="input-text text-c" name="config[{$q.id}][sort]" value="{$q.sort}" size="2"/>
                                <input type="hidden" name="config[{$q.id}][id]" value="{$q['id']}"/>
                            </td>
                            <td>{$q.title}</td>
                            <td>{$q._html}</td>
                            <td>{$q.name}</td>
                            <td>{$q.message}</td>
                            <td>
                                <if value='$q.system eq 1'>
                                    <span class="c-red">√</span>
                                    <else/>
                                    <span class="c-blue">×</span>
                                </if>
                            </td>
                            <td>
                                <if value="$q.system eq 0">
                                    <a title="删除" href="javascript:;" onclick="del_forever(this,'{$q['id']}','{|U:'del'}')" class="ml-5" style="text-decoration:none"><i class="Hui-iconfont">&#xe6e2;</i></a>
                                </if>
                            </td>
                        </tr>
                    </list>
                </table>
            </div>
           </list>
        </div>
        <div class="row cl">
            <div class="col-xs-8 col-sm-9">
                <button type="submit" class="btn btn-primary radius"><i class="iconfont icon-duigou1"></i>&nbsp;确定&nbsp;</button>
            </div>
        </div>
    </form>
</div>
<include file="__PUBLIC__/footer"/>
<script>
    $(function(){
        $.Huitab("#tab-system .tabBar span","#tab-system .tabCon","current","click","0");
        //表单提交
        $("#form").Validform({
            tiptype:2,
            ajaxPost:true,
            showAllError:true,
            callback:function(ret){
                ajax_progress(ret);
            }
        });
    });
</script>
</body>
</html>